
//modified zbrent to match needs (need to include params only)
double zbrentNEW(double func(const double,void *),
             const double x1, const double x2, const double tol,
             void * params)
{
    // This function is a modified version of the zbrent function in Numerical Recipe. We are not allowed to distribute this file. The original version of this function can be found at https://numerical.recipes/. If necessary, they can easily be replaced by equivalent functions from the GNU Scientific Library (GSL) that can be found at https://www.gnu.org/software/gsl/. Our modified version of this function can be obtained upon demand.
}


